﻿using System;
using System.Data;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using HiauPdm.Bll;
using HiauPdm.Web;

namespace HiauPdm.Web
{
    public partial class RyXzMain : PageBase
    {
        protected override bool IsAccess()
        {
            return true;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                BtnOk.Attributes["onclick"] = "SetResult('" + GridRy.ClientID + "');";
                string sWhere = Request.QueryString["sWhere"];
                if (sWhere == null) { sWhere = string.Empty; }
                DataSet ds = BMain.QueryRy(sWhere.Trim());
                GridRy.DataSource = ds;
                GridRy.DataBind();
            }
        }

        protected void GridRy_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Attributes["ondblclick"] = "SetResult('" + GridRy.ClientID + "');";
            }
        }
    }
}